<template>
	<view>
		<view class="uni-padding-wrap">
			
			<view v-for="items in lists" :key="items.title">
				<yiju-list :items="items"></yiju-list>
			</view>
			
		</view>
	</view>
</template>

<script>
	import yijuList from "../../components/custom/yiju-list/yiju-list.vue"
	export default {
		components:{
			yijuList
		},
		data() {
			return {
				lists:[
					{
						title:"纸张价格(每平方)",
						list:[
							{lx:"200g",price:"0"},
							{lx:"250g",price:"0"},
							{lx:"300g",price:"0"},
							{lx:"350g",price:"0"},
							{lx:"400g",price:"0"},
						]
					},
					{ 
						title:"刀版价格",
						list:[
							{lx:"对开",price:"0"},
							{lx:"四开",price:"05元"},
							{lx:"八开",price:"0"},
						]
					},
					{
						title:"印刷价格（价格/张数/涨幅）",
						list:[
							{lx:"对开",price:"0/0/0"},
							{lx:"四开",price:"0/0/0"},
							{lx:"八开",price:"0/0/0"},
						]
					},
					{
						title:"覆膜价格(每平方)",
						list:[
							{lx:"单面哑膜",price:"0"},
							{lx:"单面亮膜",price:"0"},
						]
					}
				]
			};
		},
		onLoad() {
			this.helper.checkLogin();
			//获取基础参数
			uni.showLoading({
				title:"数据加载中",
				mask:true
			})
			let userinfo = uni.getStorageSync("userinfo");
			let token = userinfo.token;
			let timestamp = this.helper.now();
			let sign = this.helper.setSign(['token='+token,'type=1','timestamp='+timestamp]);
			this.helper.req({
				api:"getconfig",
				timestamp:timestamp,
				data:{token:token,type:1},
				header:{sign:sign}
			}).then(res=>{
				console.log(res);
				this.lists = res.data.data;
				uni.hideLoading();
			})
		}
	}
</script>

